﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MINERP.DAL;

namespace MINERP.BLL.Common {
    /// <summary>
    /// 对系统中设定的各种特殊的文件夹的设定
    /// </summary>
    public class FileDirPathBLL {
        /// <summary>
        /// 得到远程监控的开单目录
        /// </summary>
        /// <returns></returns>
        public static string GetRemoteOrderFolder() {
            using (newSampleYPDBEntities db = new newSampleYPDBEntities()) {
                return db.FileDirPath.FirstOrDefault(f => f.id == 6).FileDir;
            }
        }

        /// <summary>
        /// 得到已开单的目录
        /// </summary>
        /// <returns></returns>
        public static string GetOrveredFolder() {
            using (newSampleYPDBEntities db = new newSampleYPDBEntities()) {
                return db.FileDirPath.FirstOrDefault(f => f.id == 2).FileDir;
            }
        }

        /// <summary>
        /// 得到等等开单的目录
        /// </summary>
        /// <returns></returns>
        public static string GetWaitOrderFolder()
        {
            using (newSampleYPDBEntities db=new newSampleYPDBEntities ())
            {
                return db.FileDirPath.FirstOrDefault(f => f.id == 1).FileDir;
            }
        }
    }
}
